﻿<wpfwiz:WizardRegularPageBase x:Class="ServiceManager.TFSIntegration.TFSAdminSettingsConfigurationPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:wpftoolbox="clr-namespace:Microsoft.EnterpriseManagement.UI.WpfToolbox;assembly=Microsoft.EnterpriseManagement.UI.FormsInfra" 
             xmlns:wpfwiz="clr-namespace:Microsoft.EnterpriseManagement.UI.WpfWizardFramework;assembly=Microsoft.EnterpriseManagement.UI.WpfWizardFramework" 
             xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" 
             d:DesignHeight="280" d:DesignWidth="550" >
    <Grid Background="#FFF0F0F0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition  Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Label Content="Team Foundation Server Integration Settings" Grid.ColumnSpan="3" HorizontalAlignment="Center" FontSize="16"  Margin="0,15"  />
            <Label    Content="TFS Url:" FontWeight="Bold" Grid.Row="1" wpftoolbox:Validation.ValueRequired="true" wpftoolbox:Validation.ValueRequiredErrorMessage="Title is a required field" />
            <TextBox Name="txtTFSUrl" Grid.Column="1" Grid.Row="1"  Text="{Binding Path=TFSUrl, Mode=TwoWay,TargetNullValue={x:Static System:String.Empty}}"/>
            <Label   Grid.Column="0" Grid.Row="2" FontWeight="Bold" Name="NoPortalLabel" Content="Portal Incident Url:" />
        <TextBox Name="txtPortalIncidentUrl" Grid.Column="1" Grid.Row="2" Text="{Binding Path=PortalIncidentUrl, Mode=TwoWay}"/>
            <Button Content="Test Connection" Grid.Column="3" Grid.Row="1" Margin="5,0,5,0" Click="TestConnection_Click"/>
            <StackPanel Grid.Column="1" Grid.Row="3" Orientation="Horizontal">
                <CheckBox Name="NoPortal" Margin="0,5" Checked="NoPortalChecked"></CheckBox>
                <Label   Content="We don't have a portal" FontWeight="Bold" />
            </StackPanel>
            <Label  Name="NoSyncLabel" Grid.Column="0" Grid.Row="4" FontWeight="Bold" Content="Synchronization Frequency:" />
            <StackPanel Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4"  Orientation="Horizontal">
                <TextBox Name="txtFrequency" Margin="5,0,5,0" Width="25" Text="{Binding Path=SyncFrequency, Mode=TwoWay, TargetNullValue={x:Static System:String.Empty}}" wpftoolbox:Validation.NumericRangeMin="1" wpftoolbox:Validation.NumericRangeMax="1440" wpftoolbox:Validation.NumericRangeErrorMessage="Frequency must be between 1 and 1440" />
                <Label  Content="(minutes)" FontWeight="Bold"/>
            </StackPanel>
            <Label  Grid.Column="0" Grid.Row="5" FontWeight="Bold" Name="ResolvedStringLabel" Content="Resolved Text:" />
            <TextBox Name="txtResolvedString" Grid.Column="1" Grid.Row="5" Text="{Binding Path=ResolvedString, Mode=TwoWay, TargetNullValue={x:Static System:String.Empty}}"/>
            <StackPanel Grid.Column="1" Grid.Row="6" Orientation="Horizontal">
                <CheckBox Name="NoSync" Margin="0,5" Checked="NoSyncChecked"></CheckBox>
                <Label  Content="Don't sync anything" FontWeight="Bold" />
            </StackPanel>
        </Grid>
       
    </Grid>
</wpfwiz:WizardRegularPageBase>
